package Infinite::Sequence::Function;
use base qw{Infinite::Sequence};

sub new {
	my( $class, $sequence, $function ) = @_;
	my $this = $class->SUPER::new();
	$this->{sequence} = $sequence;
	$this->{function} = $function;
	$this
}

sub increment {
	my( $this ) = @_;
	my $val = $this->{sequence}->increment;
	$this->{function}->( $val )
}

1
